package com.zl.learning.db.sqlite.core;

import java.util.List;
import java.util.Map;

/**
 * Created by zhaolei on 2017/5/23.
 */
public interface JdbcOperations {

    <T> T execute(StatementCallback<T> action) throws Exception;
    <T> T query(String sql, ResultSetExtractor<T> rse) throws Exception;
    <T> List<T> queryForList(String sql, Class<T> elementType) throws Exception;
    List<Map<String, Object>> queryForList(String sql) throws Exception;
    <T> List<T> queryForList(String sql, RowMapper<T> rowMapper) throws Exception;
    <T> T queryForObject(String sql, RowMapper<T> rowMapper) throws Exception;
    <T> T queryForObject(String sql, Class<T> requiredType) throws Exception;
    Map<String, Object> queryForMap(String sql) throws Exception;
    int update(String sql) throws Exception;

}
